home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kit PC World De Ampliacion De Windows 95
/
Kit PC World de ampliacion de Windows 95.iso
/
internet
/
sweeper
/
samples
/
olecon~1
/
controls
/
invisi~1
/
invisi~1.h
< prev
next >
Wrap
Text File
|
1995-11-25
|
4KB
|
115 lines
//=--------------------------------------------------------------------------=
// InvisibleCtl.H
//=--------------------------------------------------------------------------=
// Copyright 1995 Microsoft Corporation. All Rights Reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//=--------------------------------------------------------------------------=
//
// class declaration for the Invisible control.
//
#ifndef _INVISIBLECONTROL_H_
#include "IPServer.H"
#include "CtrlObj.H"
#include "InvisibleInterfaces.H"
#include "Dispids.H"
typedef struct tagINVISIBLECTLSTATE {
long lTimeOut;
} INVISIBLECTLSTATE;
//=--------------------------------------------------------------------------=
// CInvisibleControl
//=--------------------------------------------------------------------------=
// our control.
//
class CInvisibleControl : public COleControl, public IInvisible, public ISupportErrorInfo {
public:
// IUnknown methods
//
DECLARE_STANDARD_UNKNOWN();
// IDispatch methods
//
DECLARE_STANDARD_DISPATCH();
// ISupportErrorInfo methods
//
DECLARE_STANDARD_SUPPORTERRORINFO();
// IInvisible methods
//
// TODO: copy over the method declarations from InvisibleInterfaces.H
// don't forget to remove the PURE from them.
//
STDMETHOD(get_TimeOut)(long FAR* plTimeOut);
STDMETHOD(put_TimeOut)(long lTimeOut);
STDMETHOD_(void, AboutBox)(void);
// OLE Control stuff follows:
//
CInvisibleControl(IUnknown *pUnkOuter);
virtual ~CInvisibleControl();
// static creation function. all controls must have one of these!
//
static IUnknown *Create(IUnknown *);
private:
// overridables that the control must implement.
//
STDMETHOD(LoadBinaryState)(IStream *pStream);
STDMETHOD(SaveBinaryState)(IStream *pStream);
STDMETHOD(LoadTextState)(IPropertyBag *pPropertyBag, IErrorLog *pErrorLog);
STDMETHOD(SaveTextState)(IPropertyBag *pPropertyBag, BOOL fWriteDefault);
STDMETHOD(OnDraw)(HDC hdcDraw, LPCRECTL prcBounds, LPCRECTL prcWBounds, HDC hicTargetDev);
virtual LRESULT WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
virtual BOOL RegisterClassData(void);
STDMETHODIMP FreezeEvents(BOOL);
virtual BOOL OnSetExtent(SIZEL *pSize);
virtual HRESULT InternalQueryInterface(REFIID, void **);
// private state information.
//
INVISIBLECTLSTATE m_state;
HICON m_hIcon;
BOOL m_fTimer;
};
// TODO: if you have an array of verbs, then add an extern here with the name
// of it, so that you can include it in the DEFINE_CONTROLOBJECT.
// ie. extern VERBINFO m_InvisibleCustomVerbs [];
//
extern const GUID *rgInvisiblePropPages [];
DEFINE_CONTROLOBJECT(Invisible,
&CLSID_Invisible,
"InvisibleCtl",
CInvisibleControl::Create,
1,
&IID_IInvisible,
"Invisible.HLP",
&DIID_DInvisibleEvents,
OLEMISC_INVISIBLEATRUNTIME|OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|OLEMISC_RECOMPOSEONRESIZE|OLEMISC_CANTLINKINSIDE|OLEMISC_INSIDEOUT,
RESID_TOOLBOX_BITMAP,
"InvisibleWndClass",
1,
rgInvisiblePropPages,
0,
NULL);
#define _INVISIBLECONTROL_H_
#endif // _INVISIBLECONTROL_H_